﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using OOS.Core.Address;

namespace OOS.Application.Address.Services.Interfaces
{
    /// <summary>
    /// 地址管理
    /// </summary>
    public interface IAddressBookService
    {
        /// <summary>
        /// 添加地址
        /// </summary>
        /// <param name="addressBook"></param>
        /// <returns></returns>
        Boolean InsertAddressBook(AddressBook addressBook);

        /// <summary>
        /// 根据token中的用户id获取地址列表
        /// </summary>
        /// <returns></returns>
        List<AddressBook> SelectAddressBooksByUserId();

        /// <summary>
        /// 根据id查询地址详情(原始数据)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        AddressBook SelectAddressBookById(int id);
        /// <summary>
        /// 根据id修改地址
        /// </summary>
        /// <param name="addressBook"></param>
        /// <returns></returns>
        Boolean UpdateAddressBookById(AddressBook addressBook);
        /// <summary>
        /// 根据id删除地址
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Boolean DeleteAddressBookById(int id);
    }
}
